package com.tommy.ddp.finder
{
	import com.tommy.ddp.grid.DdpGrid;

	public class DisposeVo
	{
		private var _vect:Vector.<FinderVo>; 
		public var createNewVo:CreateNewVo
		
		/**
		 * 该查找结果的消除类型：是否是生成炸弹还是四个等。。
		 */		
		public var type:uint;
		
		public function DisposeVo()
		{
			_vect = new Vector.<FinderVo>();
		}
		
		public function addFinderVo(...args):void
		{
			for each(var i:FinderVo in args)
			_vect.push(i);
		}
		public function get finderVoList():Vector.<FinderVo>
		{
			return _vect;
		}
		/**
		 * 该消除内容里，带来周围被影响的格子序列
		 * @return 
		 * 
		 */		
		public function get pounchGrids():Vector.<DdpGrid>
		{
			var gridVect:Vector.<DdpGrid> = new Vector.<DdpGrid>();
			
			for each(var i:FinderVo in _vect)
			{
				var list:Vector.<DdpGrid> = i.getDPounchGridList();
				
				for each(var j:DdpGrid in list)
				{
					if(gridVect.indexOf(j) == -1)
						gridVect.push(j);
				}
			}
			
			return gridVect;
		}
		
		public function dispose():void
		{
			_vect = null;
			createNewVo = null;
		}
	}
}